def response_model(data, msg):
    return {
        "data": [data],
        "code": 200,
        "message": msg,
    }


def response_success(msg='成功', data=None):
    return {
        "data": data,
        "code": 0,
        "msg": msg,
    }


def response_error(msg, code=400):
    return {"code": code, "msg": msg}


# class ResponseSuccess(BaseModel):
#     def __int__(self, schema: BaseModel):
#         super().__init__()
#         self.schema = schema
#
#     code: int = 200
#     msg: str = '成功'
#     data: list[ResponseSuccess.schema]